﻿capital = 43

oob = "HUN_1936"
if = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "HUN_1936_air_bba"
		set_technology = {
			iw_small_airframe = 1
			engines_1 = 1
			early_bombs = 1
		}
	else = {
		set_air_oob = "HUN_1936_air_legacy"
		set_technology = {
			early_fighter = 1
			CAS1 = 1
		}
	}
}

set_research_slots = 3
set_stability = 0.7
set_war_support = 0.6

set_technology = {
	infantry_weapons = 1
	infantry_weapons1 = 1
	tech_support = 1		
	tech_recon = 1
	gw_artillery = 1

	fuel_silos = 1
	basic_train = 1
}

if = {
	limit = {
		NOT = {
			has_dlc = "No Step Back"
		}
	}
	set_technology = {
		gwtank = 1
	}
}
if = {
	limit = {
		has_dlc = "No Step Back"
	}
	set_technology = {
		gwtank_chassis = 1
	}
}

if = {
	limit = {
		has_dlc = "Death or Dishonor"
	}
	add_ideas = {
		disarmed_nation
		HUN_treaty_of_triannon
	}
}
if = {
	limit = {
		has_dlc = "By Blood Alone"
	}
	create_equipment_variant = {
		name = "WM-16"
		type = small_plane_cas_airframe_0
		modules = {
			fixed_main_weapon_slot = bomb_locks
			engine_type_slot = engine_1_1x
			special_type_slot_1 = empty
		}
	}
}

if = {
	limit = {
		#has_dlc = Battle for the Bosporus
	}
	add_opinion_modifier = { 
		target = CZE
		modifier = BFTB_incongruous_neighbors
	}
	add_opinion_modifier = { 
		target = ROM
		modifier = BFTB_incongruous_neighbors
	}
	add_opinion_modifier = { 
		target = YUG
		modifier = BFTB_incongruous_neighbors
	}
}

1939.1.1 = {
	remove_ideas = HUN_treaty_of_triannon

	add_political_power = 1198
	add_command_power = 100

	if = {
		limit = {
			has_dlc = "Death or Dishonor"
		}
		complete_national_focus = HUN_industrial_revitalization
		complete_national_focus = HUN_reintegrate_the_railroads
		complete_national_focus = HUN_economic_intervention
		complete_national_focus = HUN_secret_rearmament
		complete_national_focus = HUN_war_games
		complete_national_focus = HUN_theoretical_air_efforts
		complete_national_focus = HUN_trade_deal_with_germany
		complete_national_focus = HUN_joint_aluminum_mining_company
		complete_national_focus = HUN_reaffirm_territorial_claims
		complete_national_focus = HUN_announce_the_gyor_program
		complete_national_focus = HUN_civilian_industry
		complete_national_focus = HUN_bled_agreement
		complete_national_focus = HUN_army_maneuvers
		complete_national_focus = HUN_establish_the_air_force
		complete_national_focus = HUN_demand_southern_slovakia
		complete_national_focus = HUN_mobile_focus
		complete_national_focus = HUN_license_foreign_designs
		
		#Handle this manually
		unlock_national_focus = HUN_renounce_the_treaty_of_trianon
		add_ideas = {
			limited_conscription
			HUN_treaty_of_triannon_3
		}

		unlock_national_focus = HUN_strengthen_fascists #To avoid leader ID clash
		add_ideas = HUN_strengthen_fascists

		else = {
			#generic focuses
			complete_national_focus = army_effort
			complete_national_focus = equipment_effort
			complete_national_focus = motorization_effort
			complete_national_focus = aviation_effort
			complete_national_focus = construction_effort_2
			complete_national_focus = production_effort_2
			complete_national_focus = infrastructure_effort
			complete_national_focus = industrial_effort
			complete_national_focus = construction_effort
			complete_national_focus = production_effort		
		}
	}
	
	set_technology = {
		interwar_artillery = 1
		interwar_antitank = 1
		interwar_antiair = 1
		tech_engineers = 1
		tech_mountaineers = 1
		motorised_infantry = 1
		infantry_weapons2 = 1
		support_weapons = 1

		#doctrines
		air_superiority = 1
		grand_battle_plan = 1
		trench_warfare = 1
		fleet_in_being = 1
		battlefleet_concentration = 1
		convoy_sailing = 1

		#electronics
		electronic_mechanical_engineering = 1
		radio = 1
		radio_detection = 1
		mechanical_computing = 1
		computing_machine = 1

		#industry
		basic_machine_tools = 1
		improved_machine_tools = 1
		advanced_machine_tools = 1
		construction1 = 1
		construction2 = 1
		dispersed_industry = 1
		dispersed_industry2 = 1
		fuel_refining = 1
	}
	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "HUN_1939_air_bba"
		else = {
			set_air_oob = "HUN_1939_air_legacy"
			set_technology = {
				fighter1 = 1
				early_bomber = 1
				tactical_bomber1 = 1
			}
		}
	}
	if = {
		limit = {
			NOT = {
				has_dlc = "No Step Back"
			}
		}
		set_technology = {
			basic_light_tank = 1
	
		}
		set_oob = "HUN_1939"
	}
	if = {
		limit = {
			
			has_dlc = "No Step Back"
			
		}
		set_technology = {
			basic_light_tank_chassis = 1
	
		}

		create_equipment_variant = {
			name = "Toldi 38M"
			type = light_tank_chassis_1
			parent_version = 0
			modules = {
				main_armament_slot = tank_small_cannon
				turret_type_slot = tank_light_two_man_tank_turret
				suspension_type_slot = tank_torsion_bar_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
			}
			upgrades = {
				tank_nsb_engine_upgrade = 3
				tank_nsb_armor_upgrade = 2
			}
			icon = "GFX_generic_light_BAA_camo"
		}
		set_oob = "HUN_1939_nsb"
	}
}

set_politics = {
	ruling_party = neutrality
	last_election = "1935.3.31"
	election_frequency = 48
	elections_allowed = yes
}
set_popularities = {
	democratic = 25
	fascism = 31
	neutrality = 44
}

#Start Horty as neutral if DOD
recruit_character = HUN_miklos_horthy
recruit_character = HUN_matyas_rakosi
recruit_character = HUN_arpad_szakasits
recruit_character = HUN_geza_lakatos
recruit_character = HUN_ivan_hindy
recruit_character = HUN_karoly_beregfy
recruit_character = HUN_lajos_veress
recruit_character = HUN_ferenc_feketehalmyczeydner
recruit_character = HUN_istvan_szechenyi
recruit_character = HUN_francois_deak
recruit_character = HUN_gyorgy_jendrassik
recruit_character = HUN_jeno_ratz
recruit_character = HUN_henrik_werth
recruit_character = HUN_hugo_sonyi
recruit_character = HUN_ferenc_szombathelyi
recruit_character = HUN_gusztav_jany
recruit_character = HUN_dezso_laszlo
recruit_character = HUN_reszo_kastner
recruit_character = HUN_shvoy_kalman
recruit_character = HUN_sandor_magyarossy
recruit_character = HUN_bela_rakosi
recruit_character = HUN_kalman_kanya
recruit_character = HUN_jozsef_szell
recruit_character = HUN_vilmos_roder
recruit_character = HUN_zoltan_tildy
recruit_character = HUN_laszlo_rajk
recruit_character = HUN_kalman_daranyi
recruit_character = HUN_lajos_remenyi_schneller
recruit_character = HUN_gusztav_gratz
recruit_character = HUN_gyula_gombos_de_jakfa
recruit_character = HUN_otto_von_habsburg
recruit_character = HUN_franz_friedrich
recruit_character = HUN_ferenc_arrow_cross_leader


1939.1.1 = {
	set_politics = {
		ruling_party = fascism
		last_election = "1939.5.29"
		election_frequency = 48
		elections_allowed = yes
	}
	set_popularities = {
		democratic = 27
		fascism = 70
		communism = 3
	}
}

1941.1.1 = {
	complete_national_focus = HUN_the_botond
	complete_national_focus = HUN_armored_warfare
	complete_national_focus = HUN_invite_foreign_investors
	complete_national_focus = HUN_support_domestic_industry
	complete_national_focus = HUN_develop_tanks
	unlock_national_focus = HUN_join_axis
	unlock_national_focus = HUN_demand_transylvania
	unlock_national_focus = HUN_demand_the_vojvodina
	complete_national_focus = HUN_proclaim_greater_hungary
	oob = "HUN_1941"
	set_technology = { #Code from The Campaign In The East
		improved_light_tank = 1 
		basic_medium_tank = 1 
		CAS2 = 1
		heavy_fighter1 = 1
		interwar_artillery = 1
		interwar_antitank = 1
		infantry_weapons2 = 1
		improved_infantry_weapons = 1
		support_weapons = 1
		support_weapons2 = 1
		paratroopers = 1
		improved_medium_tank = 1
		improved_heavy_tank = 1
		support_weapons3 = 1
		mechanised_infantry = 1
		tech_mountaineers2 = 1
		tech_engineers2 = 1
		tech_recon2 = 1
		tech_field_hospital = 1
		artillery1 = 1
		artillery2 = 1
		antiair1 = 1
		antiair2 = 1
		antitank1 = 1
		antitank2 = 1
		#doctrines 
		fleet_in_being = 1
		battlefleet_concentration = 1
		convoy_sailing = 1
		subsidiary_carrier_role = 1
		#air
		force_rotation = 1
		fighter_baiting = 1
		low_echelon_support = 1
		dispersed_fighting = 1
     	#electronics
		electronic_mechanical_engineering = 1
		radio = 1
		radio_detection = 1
		decimetric_radar = 1
		mechanical_computing = 1
		computing_machine = 1
		basic_encryption = 1
		basic_decryption = 1
		improved_computing_machine = 1
		improved_decimetric_radar = 1
		improved_encryption = 1
		improved_decryption = 1

		#industry
		basic_machine_tools = 1
		improved_machine_tools = 1
		advanced_machine_tools = 1
		synth_oil_experiments = 1
		oil_processing = 1
		improved_oil_processing = 1
		construction1 = 1
		construction2 = 1
		dispersed_industry = 1
		dispersed_industry2 = 1
		dispersed_industry3 = 1
		improved_equipment_conversion = 1
    }
}

1942.1.1 = {
	complete_national_focus = HUN_mobile_corps_doctrine
	complete_national_focus = HUN_motorized_logistics
	complete_national_focus = HUN_institute_for_industrial_techniques
	complete_national_focus = HUN_joint_tank_procurement
}

1944.1.1 = {
	oob = "HUN_1944"
	add_ideas = { low_war_casualties } #approximately 155k casualties at June 1944
	if = {
		limit = {
			has_dlc = "Death or Dishonor"
		}
	complete_national_focus = HUN_expand_the_manfred_weiss_steel_works
	complete_national_focus = HUN_assault_gun_focus
	complete_national_focus = HUN_support_urbanization
	complete_national_focus = HUN_expand_the_aluminum_industry
	}
	set_technology = { #Code from 1944 Downfall

		tech_trucks = 1
		#electronics
		electronic_mechanical_engineering = 1
		radio = 1
		radio_detection = 1
		decimetric_radar = 1
		improved_decimetric_radar = 1
		centimetric_radar = 1

		#industry
		excavation1 = 1
		excavation2 = 1
		excavation3 = 1

		#doctrine
		trench_warfare = 1
		grand_battle_plan = 1
		prepared_defense = 1
		grand_assault = 1
		infantry_offensive = 1

		basic_machine_tools = 1
		improved_machine_tools = 1
		advanced_machine_tools = 1

		fuel_silos = 1
		fuel_refining = 1
		fuel_refining2 = 1
		fuel_refining3 = 1

		synth_oil_experiments = 1
		oil_processing = 1
		rubber_processing = 1
		construction3 = 1
		dispersed_industry4 = 1

		support_weapons3 = 1

		improved_infantry_weapons = 1
		improved_infantry_weapons_2 = 1

		infantry_at = 1

		gw_artillery = 1
		artillery1 = 1
		artillery2 = 1
		artillery3 = 1
		#artillery4 = 1

		antiair3 = 1
		
		antitank3 = 1
		#antitank4 = 1

		motorised_infantry = 1

		tech_mountaineers = 1
		tech_support = 1

		tech_engineers = 1
		tech_engineers2 = 1
		tech_engineers3 = 1

		tech_recon = 1
		tech_recon2 = 1
		tech_recon3 = 1

		tech_field_hospital = 1
		tech_field_hospital2 = 1

		tech_military_police = 1

		tech_maintenance_company = 1
		tech_maintenance_company2 = 1
		
		basic_train = 1
	}

	if = {
		limit = {
			has_dlc = "Death or Dishonor"
		}
		set_technology = {
			improved_equipment_conversion = 1
			advanced_equipment_conversion = 1
		}
	}


	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_technology = {
				photo_reconnaisance = 1

				#survivability_studies = 1

				aa_lmg = 1
				aa_hmg = 1

				aa_cannon_1 = 1
				#aa_cannon_2 = 1
				
				engines_1 = 1
				engines_2 = 1
				#engines_3 = 1

				#range_improvements = 1

				early_bombs = 1

				aircraft_construction = 1
				
				engines_1 = 1
				engines_2 = 1
				engines_3 = 1

				iw_small_airframe = 1
				basic_small_airframe = 1
				improved_small_airframe = 1
				#advanced_small_airframe = 1

				iw_medium_airframe = 1
				basic_medium_airframe = 1
				improved_medium_airframe = 1

				iw_large_airframe = 1
				basic_large_airframe = 1
				#improved_large_airframe = 1
				#advanced_large_airframe = 1

				air_torpedoe_1 = 1
				#air_torpedoe_2 = 1
			}
		else = {
			set_technology = {

				naval_bomber1 = 1

				CAS1 = 1
				CAS2 = 1
		
				early_fighter = 1
				fighter1 = 1
				fighter2 = 1
				#fighter3 = 1
		
				heavy_fighter1 = 1
				#heavy_fighter2 = 1
		
				strategic_bomber1 = 1
				#strategic_bomber2 = 1
		
				tactical_bomber1 = 1
				tactical_bomber2 = 1
			}
		}
	}

	if = {
		limit = {
			has_dlc = "La Resistance"
		}
		set_technology = {
			armored_car1 = 1
			armored_car2 = 1
		}
	}


	if = {
		limit = { has_dlc = "Man the Guns" } 
		set_technology = {
			
			basic_naval_mines = 1
			submarine_mine_laying = 1
			early_ship_hull_light = 1
			#basic_ship_hull_light = 1
			early_ship_hull_submarine = 1
			#basic_ship_hull_submarine = 1
			early_ship_hull_cruiser = 1
			basic_battery = 1
			basic_cruiser_armor_scheme = 1
			basic_torpedo = 1
			basic_depth_charges = 1
			coastal_defense_ships = 1
			mtg_transport = 1
			early_ship_hull_carrier = 1

			sonar = 1
			smoke_generator = 1

			damage_control_1 = 1

			#fire_control_methods_1 = 1

			basic_light_battery = 1
			#basic_light_shell = 1
			#improved_light_battery = 1
			#improved_light_shell = 1
	
			basic_medium_battery = 1
			#basic_medium_shell = 1

			#improved_ship_hull_submarine = 1
			#improved_ship_hull_light = 1

			#improved_ship_torpedo_launcher = 1

			basic_fire_control_system = 1
			#improved_depth_charges = 1
		}
		else = {
			set_technology = {
				early_submarine = 1
				early_destroyer = 1
				basic_destroyer = 1
				early_light_cruiser = 1
				early_heavy_cruiser = 1
				transport = 1
			}
		}
	}

	if = {
		limit = {
			has_dlc = "Arms Against Tyranny"
		}
		set_technology = {
			special_forces_mountaineers = 1
		}
	}

	if = {
		limit = {
			
			has_dlc = "No Step Back"
			
		}
		set_technology = {
			gwtank_chassis = 1

			basic_medium_tank_chassis = 1 
			improved_medium_tank_chassis = 1 

			basic_light_tank_chassis = 1 
			improved_light_tank_chassis = 1 

			basic_heavy_tank_chassis = 1 
			improved_heavy_tank_chassis = 1 

			armor_tech_1 = 1
			armor_tech_2 = 1

			engine_tech_1 = 1
			engine_tech_2 = 1
		}
		else = {
			set_technology = {
				gwtank = 1

				basic_light_tank = 1
				improved_light_tank = 1

				basic_medium_tank = 1
				improved_medium_tank = 1
				#advanced_medium_tank = 1

				basic_heavy_tank = 1
				improved_heavy_tank = 1
				#advanced_heavy_tank = 1

				basic_light_art = 1
				improved_light_art = 1

				basic_medium_art = 1
				improved_medium_art = 1

				basic_light_spaa = 1
				improved_light_spaa = 1

				basic_medium_spaa = 1
				improved_medium_spaa = 1

				basic_light_td = 1
				improved_light_td = 1

				basic_medium_td = 1
				improved_medium_td = 1
			}
		}
	}
}

1945.1.1 = {
    set_country_leader_name = {
	name = ferenc_arrow_cross_leader
	}
	set_party_name = {
	ideology = fascism
	long_name = ln_arrow_cross_party
	name = arrow_cross_party
	}
	set_portraits = {
		character = HUN_miklos_horthy
		civilian = {
			large ="gfx/leaders/HUN/Portrait_Ferenc.dds"
		}
	}
	add_ideas = { stop_surrendering }
}

1945.5.1 = {
    oob = "HUN_VE_DAY"
}